// import com.alibaba.druid.DbType;
// import com.alibaba.druid.sql.ast.SQLExpr;
// import com.alibaba.druid.sql.ast.SQLStatementImpl;
// import com.alibaba.druid.sql.visitor.SQLASTVisitor;

#include "SQLPurgeLogsStatement.h"
#include "../../visitor/SQLASTVisitor.h"

SQLPurgeLogsStatement::SQLPurgeLogsStatement()
{
}

SQLPurgeLogsStatement::SQLPurgeLogsStatement(DbType_ptr dbType)
    : SQLStatementImpl(dbType)
{
}

// @Override
void SQLPurgeLogsStatement::accept0(SQLASTVisitor_ptr visitor)
{
  if (visitor->visit(SharedObject(SQLPurgeLogsStatement)))
  {
    acceptChild(visitor, to);
    acceptChild(visitor, before);
  }
  visitor->endVisit(SharedObject(SQLPurgeLogsStatement));
}

SQLExpr_ptr SQLPurgeLogsStatement::getTo()
{
  return to;
}

void SQLPurgeLogsStatement::setTo(SQLExpr_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(SQLPurgeLogsStatement));
  }
  this->to = x;
}

SQLExpr_ptr SQLPurgeLogsStatement::getBefore()
{
  return before;
}

void SQLPurgeLogsStatement::setBefore(SQLExpr_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(SQLPurgeLogsStatement));
  }
  this->before = x;
}

BOOL_ptr SQLPurgeLogsStatement::isBinary()
{
  return binary;
}

void SQLPurgeLogsStatement::setBinary(BOOL_ptr binary)
{
  this->binary = binary;
}

BOOL_ptr SQLPurgeLogsStatement::isMaster()
{
  return master;
}

void SQLPurgeLogsStatement::setMaster(BOOL_ptr master)
{
  this->master = master;
}

BOOL_ptr SQLPurgeLogsStatement::isAll()
{
  return all;
}

void SQLPurgeLogsStatement::setAll(BOOL_ptr all)
{
  this->all = all;
}
